package com.honghu.villagepost.adapter

import com.honghu.villagepost.R
import com.honghu.villagepost.entity.Goods
import com.honghu.villagepost.util.GlideUtil
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import com.honghu.villagepost.util.DensityUtil

/**
 * @author: mqwang
 * @create: 2/7/21 2:32 PM
 * @Description:
 */
class GoodsAdapter() :BaseQuickAdapter<Goods, BaseViewHolder>(R.layout.adapter_store_goods_item) {

    override fun convert(helper: BaseViewHolder?, item: Goods?) {

        GlideUtil.loadImg(helper!!.getView(R.id.iv_image), item!!.majorPic)
        helper.setText(R.id.tv_name, item.name)
        helper.setText(R.id.tv_price, mContext.getString(R.string.price_format, item.price))

    }
}